<!DOCTYPE html>
<html lang="zh">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>login</title>
    <link rel="icon" th:href="@{/assets/img/lcxm.ico}" type="image/ico">
    <th:block th:replace="headfoot/head::head_common"></th:block>
</head>
<body style="background-image: url(assets/img/login-bg-2.jpg); background-size: cover;">

<div class="container">
    <div class="row">
        <div id="" class="col-md-6 col-md-offset-3">

            <div class="page-header" style="margin-top: 20px;top:50%;">
                <h3 class="text-primary">后台管理<small>随便写写</small></h3>
            </div>
            <div class="panel panel-success">
                <div class="panel-body">
                    <div th:if="${remind}" class="alert alert-${ remind.level  }"
                         th:classappend="'alert-' + ${remind.level}">
                        <button data-dismiss="alert" class="close" type="button">
                            <i class="glyphicon glyphicon-remove"></i>
                        </button>
                        <span th:remove="tag" th:utext="${ remind.message }"></span>
                    </div>
                    <!--  -->
                    <form class="form-horizontal" method="post" th:action="@{/login}">
                        <div class="form-group">

                            <label for="userType" class="col-md-2 control-label">身份</label>
                            <div class="col-md-8">
                                <select class="form-control" id="userType" name="userType">
                                    <option value="manager">管理员</option>
                                    <option value="student">学生</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">

                            <label for="userCode" class="col-md-2 control-label">账号</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" id="userCode" name="username" placeholder="账号">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="password" class="col-md-2 control-label">密码</label>
                            <div class="col-md-8">
                                <input type="password" class="form-control" id="password" name="password"
                                       placeholder="密码">

                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-8">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" name="rememberMe" checked="checked"> 记住密码
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-8">
                                <button type="submit" class="btn btn-success btn-block">立即登录</button>
                            </div>
                        </div>
                    </form>
                    <footer class="col-sm-12 text-center">
                        <p class="m-b-0">Copyright © 2021 <a href="https://www.xuqiudong.cn" target="_blank">临窗旋墨</a>.
                            All right reserved</p>
                    </footer>

                    <!--  -->
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 引入通用js-->
<div th:replace="headfoot/foot :: base_third_foot"></div>
<script>
    $(function () {
        //验证是否存在错误消息
        var fail = [['${msg!}']];
        if (fail) {
            alert(fail);
        }
    });
</script>
</body>
</html>